package com.edu.comment.service;

import com.edu.api.entity.comment.CourseComment;
import com.baomidou.mybatisplus.extension.service.IService;
import com.edu.api.entity.commentdto.CourseCommentDto;
import com.edu.api.entity.common.Page;
import com.edu.api.entity.common.Pageable;
import com.edu.api.entity.common.ResponseDTO;

import javax.servlet.http.HttpServletRequest;

/**
 *
 */
public interface CourseCommentService extends IService<CourseComment> {


    ResponseDTO saveOrCancelFavorite(Integer commentId, HttpServletRequest request);

    /**
     * 查询文章留言
     *
     * @param courseId
     * @param pageable
     * @return
     */
    ResponseDTO<Page<CourseCommentDto>> getCourseCommentList(String courseId, Pageable pageable);

    /**
     * 发表留言
     *
     * @param courseId
     * @param userId
     * @param userName
     * @param comment
     * @return
     */
    ResponseDTO<Integer> saveCourseComment( String courseId, String userId, String userName, String comment);

}
